package ooday01;
//** 学生类的测试类 */
public class StudentTest {
    public static void main(String[] args) {
        //           引用
        //数据类型  引用类型变量    指向        对象
        Student       zs         =     new Student();//声明Student类型引用zs指向了一个学生对象
        //访问成员变量
        zs.name = "张三";
        zs.age = 20;
        zs.className = "JSD2302";
        zs.stuId = "001";
        //调用方法
        zs.study();
        zs.sayHi();
        zs.playWith("李四");


        Student ls = new Student();
        ls.name = "李四";
        ls.age = 25;
        ls.stuId ="002";
        ls.className = "JSD2302";
        ls.sayHi();//方法名，调用李四打招呼方法
        ls.study();//方法名，调用李四学习方法
        ls.playWith("张三");//方法名，调用李四和谁玩方法，参数输入和张三玩


        Student ww = new Student();//没赋值，int 类型默认值 = 0;String 类型默认值 = null
        ww.sayHi();
        ww.study();
        ww.playWith("波多野结衣");

        Student www = new Student("王王王",21,"JSD2302","004");//传参
        www.sayHi();

        Student JJJ = new Student("鸡鸡鸡",200);
        JJJ.sayHi();//调方法
    }
}
